// import qs from 'qs'
import { COMMON_METHOD } from '@/constant/common'
import Vue from 'vue'

const moduleName = 'scheduler'
// 任务
export const job = Object.assign({}, COMMON_METHOD, {
  serveUrl: '/' + moduleName + '/' + 'job' + '/'

}
)
// 调度任务
export const schedulerJob = Object.assign({}, COMMON_METHOD, {
  serveUrl: '/' + moduleName + '/' + 'schedulerJob' + '/',
  pause(id) {
    return Vue.prototype.$httpRequest.put(this.serveUrl + id + '/pause')
  },
  resume(id) {
    return Vue.prototype.$httpRequest.put(this.serveUrl + id + '/resume')
  },
  pauseAll() {
    return Vue.prototype.$httpRequest.put(this.serveUrl + 'pauseAll')
  },
  resumeAll() {
    return Vue.prototype.$httpRequest.put(this.serveUrl + 'resumeAll')
  },
  execute(id) {
    return Vue.prototype.$httpRequest.put(this.serveUrl + id + '/execute')
  }
}
)

